package org.ehe.finance.receipt.enums;

/**
 * 收款单状态枚举
 * @author :zhangnn
 * @className :Status
 * @description: TODO
 * @date 2025-09-02 15:18:25
 */
public enum Status {
    DRAFT(1, "未审核"),
    AUDITED(2, "已审核");

    private final Integer code;
    private final String desc;

    Status(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() { return code; }
    public String getDesc() { return desc; }

    public static String getDescByCode(Integer code) {
        for (Status status : values()) {
            if (status.code.equals(code)) {
                return status.desc;
            }
        }
        return "未知";
    }
}
